<?php

?>

<div id="node-<?php print $node->nid; ?>" class="program <?php print $classes; ?> clear fix"<?php print $attributes; ?>>

    <div class="content"<?php print $content_attributes; ?>>

        <h1 class="title" id="page-title"><?php echo $title; ?></h1>
        <div class="line"></div>

        <div class="left">
            <div class="item">
                <label>Program Description</label>
                <?php echo $node->field_program_description['und'][0]['value']; ?>
            </div>
            <div class="item">
                <label>Career Opportunities</label>
                <?php echo $node->field_career_opportunities['und'][0]['value']; ?>
            </div>
            <div class="item">
                <label>Admission Requirements</label>
                <?php echo $node->field_admission_requirements['und'][0]['value']; ?>
            </div>
            <div class="item">
                <label>Other Materials</label>
                <?php echo $node->field_other_materials['und'][0]['value']; ?>
            </div>
            <div class="item">
                <label>Program Duration</label>
                <?php echo $node->field_program_duration['und'][0]['value']; ?>
            </div>
            <div class="item">
                <label>Homework Hours</label>
                <?php echo $node->field_homework_hours['und'][0]['value']; ?>
            </div>
        </div>

        <div class="right">
            <div class="item">
                <label>Delivery Methods</label>
                <?php echo $node->field_delivery_methods['und'][0]['value']; ?>
            </div>
            <div class="item">
                <label>Instructional Methods</label>
                <?php echo $node->field_instructional_methods['und'][0]['value']; ?>
            </div>
            <div class="item">
                <label>Learning Objectives/Outcomes</label>
                <?php echo $node->field_learning_objectives_outcom['und'][0]['value']; ?>
            </div>
            <div class="item">
                <label>Student Progress/Assesment Methods</label>
                <?php echo $node->field_student_progress['und'][0]['value']; ?>
            </div>
            <div class="item">
                <label>Attendance Expectations</label>
                <p><?php echo $node->field_attendance_expectations['und'][0]['value']; ?></p>
            </div>
            <div class="item">
                <label>Dress Expectations (if applicable)</label>
                <?php echo $node->field_dress_expectations['und'][0]['value']; ?>
            </div>
            <div class="item">
                <label>Graduation Requirements</label>
                <?php echo $node->field_graduation_requirements['und'][0]['value']; ?>
            </div>
        </div>

        <div class="clear"></div>


        <div class="course-wrapper">
            <h2 class="subtitle">Courses</h2>
            <div class="line"></div>

            <?php
            foreach($node->field_program_organization['und'] as $id => $val) {
                $collection = field_collection_item_load($val['value']);
                $course = node_load($collection->field_program_course_name['und']['0']['nid']);
                $hour = $collection->field_program_num_hours['und']['0']['value'];
                $course_code = explode(' ', $course->field_course_code['und'][0]['value']);
                $course_path = drupal_lookup_path('alias', 'node/' . $course->nid);
            ?>
                <div class="course">
                    <a href="/<?php echo $course_path; ?>">
                        <div class="course-code">
                            <div class="code-name"><?php echo $course_code[0]; ?></div>
                            <div class="code-numb"><?php echo $course_code[1]; ?></div>
                        </div>
                    </a>

                    <div class="course-info">
                        <a href="/<?php echo $course_path; ?>"><h3><?php echo $course->field_course_name['und'][0]['value']; ?></h3></a>

                        <?php echo ellipsis($course->field_course_description['und'][0]['value'], 110); ?>
                    </div>

                    <div class="clear"></div>
                </div>
            <?php } ?>
            <div class="clear"></div>
        </div>
    </div>
</div>